// Copyright (c) 2007 Robin Boerdijk. All rights reserved.
//
// This software is licensed under the terms of the Microsoft Reciprocal License as described 
// in the file LICENSE.txt, which you should have received as part of this distribution. The 
// license terms are also available at http://www.opensource.org/licenses/ms-rl.html.

#include "demo/AboutBox.h"

#include "wtk/Boxes.h"

namespace demo
{
	AboutBox::AboutBox(wtk::Window *parentWindow)
		: wtk::DialogWindow(parentWindow, L"About WTK")
		, m_staticText(this, L"WTK\nA modern C++ GUI toolkit for Windows\n\xA9 2007 Robin Boerdijk. All rights reserved.", SS_CENTER)
		, m_okButton(this, L"OK")
	{
	}

	wtk::Box *AboutBox::CreateClientBox()
	{
		wtk::VerticalBox *clientBox = new wtk::VerticalBox(2);
		clientBox->AddControlBox(m_staticText);
		wtk::HorizontalBox *bottomBox = clientBox->AddHorizontalBox();
		bottomBox->AddFillerBox();
		bottomBox->AddControlBox(m_okButton);
		bottomBox->AddFillerBox();
		return clientBox;
	}
}
